package domain.controller;

import java.io.IOException;
import java.util.regex.Pattern;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@SuppressWarnings("serial")
public class TrackIpIndexServlet extends HttpServlet {
	public void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws IOException {
		resp.setContentType("text/plain");
		resp.setCharacterEncoding("utf-8");
		String ip = req.getRemoteAddr();

        req.setAttribute("ip", ip);		
		req.setAttribute("title", "Track Ip - domain-infomation.appspot.com");
		req.setAttribute("description", "Track ip.domain-site-whois.info - search, ip lookup information on domain-infomation.appspot.com");
		req.setAttribute("keyword", "ip,ip address,track ip,lookup ip");
		try {
			req.getRequestDispatcher("/track_ip_index.jsp").forward(req, resp);
		} catch (ServletException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
